package business;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import struts.action.Action;
import struts.form.ActionForm;

public class TestAction implements Action {

    @Override
    public String execute(HttpServletRequest request,HttpServletResponse response, ActionForm form, Map<String, String> actionfoward) {
        String url = "fail";
        TestForm testfm = (TestForm)form;
        if(testfm.getName().equals("cjm")){
            url = "succ";
        }
        return actionfoward.get(url);
    }

}
